package com.cntcdt.api.db.dao;

import java.util.List;

import com.cntcdt.api.db.dao.base.UpdateGroupDaoBase;
import com.cntcdt.api.db.model.UpdateDeviceVersionModel;
import com.cntcdt.api.db.model.UpdateGroupModel;

/**
 * 这是cdt_update_group的Dao实现类
 */
public class UpdateGroupDao extends UpdateGroupDaoBase   {
    /**
     * UpdateGroupDao对象
     */
    private static UpdateGroupDao instance = new UpdateGroupDao();

    /**
     * 默认构造方法
     */
    private UpdateGroupDao() {
    }

    /**
     * 获得对象实例
     */
    public static UpdateGroupDao getInstance() { 
         return instance;
    } 
    
    public List<UpdateGroupModel> findBySortTime(int sortTime) {
    	sortTime = sortTime*20;
        String sql = "SELECT * FROM " + TABLE + " where opStatus = 0 order by addTime desc limit ?,20";
       Object[] paramObjs = {sortTime};
       List<UpdateGroupModel> modelList = this.queryModelList(sql, paramObjs);
       return modelList;
   }

}
